#ifndef __SPRITE_H__
#define __SPRITE_H__

#include <windows.h>
#include <d3d9.h>
#include <d3dx9.h>

class Tien {
protected: 
	//LPDIRECT3DSURFACE9 _Surface;			// The surface to store all the sprite
	LPDIRECT3DTEXTURE9 _Image;

	//LPDIRECT3DDEVICE9 _DXDevice;			
	LPD3DXSPRITE _SpriteHandler;

	int _Index;								// Current sprite index
	int _Width;								// Sprite width
	int _Height;							// Sprite height
	int _Count;								// Number of sprites
	int _SpritePerRow;						// Number of sprites per row
public: 
	Tien(LPD3DXSPRITE SpriteHandler, char *Path, int Width, int Height, int Count, int SpritePerRow); // Constructor
	
	void Next();

	// Render current sprite at location (X,Y) at the target surface
	void Renders(int X, int Y);
	
	~Tien(); //Destructor
};

#endif